home *** CD-ROM | disk | FTP | other *** search
/ Workbench Design / WB Collection.iso / datatypes / ams / install < prev    next >
Text File  |  1996-04-07  |  3KB  |  116 lines

  1. ;******************************************************************************
  2. ; Installation script for DataTypes Collection #2 (AMS)
  3. ; Written by David N. Junod
  4. ;******************************************************************************
  5.  
  6. ; Initialize a few things
  7. (set docbits 0)
  8.  
  9. ;******************************************************************************
  10. ; Ask the user if we are installing or removing
  11.  
  12. (set mode
  13.     (askchoice
  14.         (prompt @app-name)
  15.         (help @askchoice-help)
  16.         (choices "Install" "Remove")
  17.     )
  18. )
  19.  
  20. ; Set the prompt string
  21. (if mode
  22.     (set pmode "Remove")
  23.     (set pmode "Install")
  24. )
  25.  
  26. ;******************************************************************************
  27. ; Prompt for components and their directories
  28.  
  29. ; Classes
  30. (set classdir
  31.     (askdir
  32.         (prompt "Where do the Classes belong")
  33.         (help @askdir-help)
  34.         (default "SYS:Classes")
  35.     )
  36. )
  37.  
  38. ;******************************************************************************
  39. ;******************************************************************************
  40. ;******************************************************************************
  41.  
  42. (if mode
  43.         ;**********************************************************************
  44.     ; Remove
  45.         ;**********************************************************************
  46.     (
  47.         ; Show what we are doing
  48.         (working "Removing " @app-name)
  49.  
  50.         ; Remove the non-standard pieces
  51.         (delete (tackon classdir "datatypes/sunau.datatype"))
  52.         (delete (tackon classdir "datatypes/xbm.datatype"))
  53.         (delete "devs:datatypes/Sun Audio" (infos))
  54.         (delete "devs:datatypes/X-Bitmap" (infos))
  55.  
  56.         ; Don't want to use the confusing "Installation Complete" message
  57.         ; when what we really did was remove things...
  58.         (message "The \"" @app-name "\" components "
  59.              "that you specified have been successfully removed")
  60.         (exit (quiet))
  61.     )
  62.  
  63.         ;**********************************************************************
  64.     ; Install
  65.         ;**********************************************************************
  66.     (
  67.         ; Show what we are doing
  68.         (working "Installing " @app-name)
  69.  
  70.         ; Install the classes
  71.         (copylib
  72.             (prompt "Copying Sun audio DataType")
  73.             (help @copylib-help)
  74.             (source "classes/datatypes/sunau.datatype")
  75.             (dest (tackon classdir "DataTypes"))
  76.             (confirm)
  77.         )
  78.         (copylib
  79.             (prompt "Copying X-Bitmap picture DataType")
  80.             (help @copylib-help)
  81.             (source "classes/datatypes/xbm.datatype")
  82.             (dest (tackon classdir "DataTypes"))
  83.             (confirm)
  84.         )
  85.         (copylib
  86.             (prompt "Updating the Picture DataType")
  87.             (help @copylib-help)
  88.             (source "classes/datatypes/picture.datatype")
  89.             (dest (tackon classdir "DataTypes"))
  90.             (confirm)
  91.         )
  92.  
  93.         ; Install the descriptors
  94.         (copyfiles
  95.             (prompt "Copying the Descriptors")
  96.             (help @copyfiles-help)
  97.             (source "devs")
  98.             (dest "DEVS:")
  99.             (pattern "#?")
  100.             (infos)
  101.             (confirm)
  102.         )
  103.  
  104.         ; Tell the system about the new descriptors
  105.         (run "C:AddDataTypes Refresh")
  106.  
  107.         ; See if they are running Amiga Mosaic.  If they are, then give a little
  108.         ; personalized message :-)
  109.         (if (= (exists "ENVARC:Mosaic") 2)
  110.             (message "Update your ENVARC:Mosaic/MailCap so that it will use MultiView for all audio.\n\naudio/*; sys:Utilities/MultiView %s")
  111.         )
  112.     )
  113. )
  114.  
  115. (set @default-dest classdir)
  116.